package com.asiainfo.framework.dao;

import com.asiainfo.framework.model.Model;
import com.asiainfo.framework.web.page.PageResult;
import com.asiainfo.framework.web.page.Pagination;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;

import java.util.List;

public class BaseDao extends AbstractDao {

    private final String name;
    private final SqlSessionFactory sqlSessionFactory;

    public BaseDao(String name, SqlSessionFactory sqlSessionFactory) {
        this.name = name;
        this.sqlSessionFactory = sqlSessionFactory;
    }

    @Override
    public SqlSession getSqlSession() {
        return null;
    }

    @Override
    public <E> List<E> selectList(String statementId) {
        return null;
    }

    @Override
    public <E> List<E> selectList(String statementId, Object param) {
        return null;
    }

    @Override
    public <E> PageResult<E> selectList(String statementId, Object param, Pagination pagination) {
        return null;
    }

    @Override
    public <E> List<E> selectList(Model model) {
        return null;
    }

    @Override
    public <E> PageResult<E> selectList(Model entity, Pagination pagination) {
        return null;
    }

    @Override
    public <E> PageResult<E> selectList(Model entity, Pagination pagination, Integer cacheSeconds) {
        return null;
    }

    @Override
    public <T> T selectOne(String statementId) {
        return null;
    }

    @Override
    public <T> T selectOne(String statementId, Object param) {
        return null;
    }

    @Override
    public <T> T selectOne(Model model) {
        return null;
    }

    @Override
    public Long selectCount(String statementId) {
        return null;
    }

    @Override
    public Long selectCount(String statementId, Object param) {
        return null;
    }

    @Override
    public Long selectCount(Model model) {
        return null;
    }

    @Override
    public int insert(String statementId) {
        return 0;
    }

    @Override
    public int insert(String statementId, Object param) {
        return 0;
    }

    @Override
    public int insert(Model model) {
        return 0;
    }

    @Override
    public void insertBatch(List<? extends Model> list) {

    }

    @Override
    public int update(String statementId) {
        return 0;
    }

    @Override
    public int update(String statementId, Object param) {
        return 0;
    }

    @Override
    public int update(Model model) {
        return 0;
    }

    @Override
    public void updateBatch(List<? extends Model> list, String... conditionColumns) {

    }

    @Override
    public int delete(String statementId) {
        return 0;
    }

    @Override
    public int delete(String statementId, Object param) {
        return 0;
    }

    @Override
    public int delete(Model entity) {
        return 0;
    }

    @Override
    public String toString() {
        return String.format("DAO[%s]", name);
    }
}
